package com.cmict.data.form.api.entity.vo;

import com.cmict.data.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static com.cmict.data.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@ApiModel("管理后台 - 字段信息分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class MdColumnsPageReqVO extends PageParam {

    @ApiModelProperty(value = "表id")
    private String tableId;

    @ApiModelProperty(value = "字段名")
    private String columnName;

    @ApiModelProperty(value = "字段位置")
    private Long ordinalPosition;

    @ApiModelProperty(value = "字段内容是否为空")
    private String isNullable;

    @ApiModelProperty(value = "numeric_presision")
    private Long numericPrecision;

    @ApiModelProperty(value = "numeric_scale")
    private Long numericScale;

    @ApiModelProperty(value = "datetime_precision")
    private Long datetimePrecision;

    @ApiModelProperty(value = "character_set_name")
    private String characterSetName;

    @ApiModelProperty(value = "字段类型")
    private String columnType;

    @ApiModelProperty(value = "column_key")
    private String columnKey;

    @ApiModelProperty(value = "字段注释")
    private String columnComment;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime gmtCreate;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime gmtModified;

    @ApiModelProperty(value = "是否删除,1删除，0未删除")
    private Integer isDeleted;

    @ApiModelProperty(value = "qualifield_name")
    private String qualifieldName;

    @ApiModelProperty(value = "prefix_name")
    private String prefixName;

}
